import React, {PureComponent} from 'react'

class Btn extends PureComponent{
  onClick = e =>{
    const {onClick} = this.props

    onClick && onClick(e)
  }
  render(){
    const {children} = this.props;

    return <button onClick={this.onClick}>{children}</button>
  }
}

export default Btn;